home *** CD-ROM | disk | FTP | other *** search
- _ Author: Andrew Lowry
- _
- _ Columbia University Center for Computing Activities, July 1986.
- _ Copyright (C) 1986, 1987, Trustees of Columbia University in the
- _ City of New York. Permission is granted to any individual or
- _ institution to use, copy, or redistribute this software so long as
- _ it is not sold for profit, provided this copyright notice is
- _ retained.
- _
-
- /* keyword parse errors */
-
- fnerror(NM,`Does not match keyword')
- fnerror(AMB,`Ambiguous')
- fnerror(ABR,`Invalid abbreviation chain in keyword table')
-
- /*
- * KEYWRD structure specifies one entry in a keyword table. KEYTAB
- * structure describes a table of keywords.
- */
-
- #ifdef notdef
- /*
- * we want to return "anything" as the value of a keyword,
- * so we need to know what is the 'largest' type in a machine independent
- * way. I can't figure out a way to do this at compile time, so we'll use a
- * generated include file.
- */
-
- #include "cmkeyval.h" /* this defines the keyval type */
- #endif
-
- #ifdef KEYVAL_TYPE
- typedef KEYVAL_TYPE keyval;
- #else
- typedef long keyval;
- #endif
-
-
- typedef struct KEYWRD {
- char * _kwkwd; /* keyword string */
- short _kwflg; /* flags (see below) */
- keyval _kwval; /* arbitrary value, not used internally */
- /* except for abbreviations... see KEY_ABR */
- /* flag below */
- } keywrd;
-
- typedef struct KEYTAB {
- int _ktcnt; /* number of keywords in table */
- keywrd * _ktwds;/* array of keyword entries */
- } keytab;
-
- /* Valid flags in fdb */
- fnflag(EMO) /* exact match only */
-
- /* flags that can be present in a keyword entry */
-
- fnflag(ABR) /* keyword is an abbreviation for the */
- /* keyword indexed by this entry's _kwval value */
-
- fnflag(NOR) /* Ignore this keyword (do not recognize */
- /* any prefix, or even an exact match) */
- #define KEY_IGN KEY_NOR
- fnflag(INV) /* Invisible keyword (not shown with help) */
- fnflag(MAT) /* This keyword matches current input */
- /* (used internally) */
-
- pvtype(keyval)_ /* KEY returns a keyval. */
-